<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<Killboard.Models.ekbKill>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	ShowKillsByType
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<script type="text/javascript">

    function DoNav(theUrl) {

        document.location.href = theUrl;
    }
  
</script>
<h2><%=ViewData["shipType"] %> kills: </h2>

<%
    Killboard.Models.KillRepository repo = new Killboard.Models.KillRepository();
    Killboard.Models.ekbConfig config = repo.GetConfiguration();

    var kills = from c in Model
                where c.VictimCorpID != config.OwningCorpID
                select c;

    Html.RenderPartial("KillList", kills.OrderByDescending(o => o.KillTimeUTC));
     %>

<h2><%=ViewData["shipType"] %> losses: </h2>
<%

    var losses = from c in Model
                where c.VictimCorpID == config.OwningCorpID
                select c;

    Html.RenderPartial("KillList", losses.OrderByDescending(o => o.KillTimeUTC));
     %>
</asp:Content>

